package com.itheima.dao;


import com.github.pagehelper.Page;
import com.itheima.pojo.OrderSetting;
import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderSettingDao {


    //上传文件
    void add(OrderSetting orderSetting);

    //根据日期查询出现的次数
    long findCountByOrderDate(Date orderDate);

    //根据日期修改,可预约人数
    void editNumberByOrderDate(OrderSetting orderSetting);

    List<OrderSetting> getOrderSettingByMonth(Map<String,String> map);

    OrderSetting findByOrderDate(Date parseString2Date);

    void editReservationsByOrderDate(OrderSetting orderSetting);

    // 根据日期修改预约的人数 -1
    void ReservationsReduceByOrderDate(@Param("orderDate") Date orderDate);
    // 根据日期修改预约人数  +1
    void ReservationsPlusByOrderDate(@Param("orderDate") Date orderDate);


    public Integer findCountByDate(String date);

    //查询一段时间内的OrderSetting
    public List<OrderSetting> findCountByDuring(@Param("date1") String date1, @Param("date2") String date2);

    //xyl   获取指定日期的各套餐收入
    public List<Map<String, Object>> getSetmealAndIncome(String date);

    //xyl   获取时间区间的各套餐收入
    public List<Map<String, Object>> getDuringSetmealAndIncome(@Param("date1") String date1, @Param("date2") String date2);
}
